namespace ku.datamodel.contract
{
    public class Token
    {
        public Token(string inhalt, TokenType typ) {
            Inhalt = inhalt;
            Typ = typ;
        }

        public string Inhalt { get; private set; }

        public TokenType Typ { get; private set; }


        public override bool Equals(System.Object obj)
        {
            if (obj == null) return false;

            Token t = obj as Token;
            if (t == null) return false;

            return this.Typ == t.Typ && this.Inhalt == t.Inhalt;
        }
    }

    public enum TokenType
    {
        Wort,
        Whitespace,
        Satzzeichen,
        Absatzende,
        Softtrenner,
        Textende
    }
}